#pragma once
/*
Copyright (C) 2010 Dengwenyi

This file is part of dae2n3.

Licensed under the MIT Open Source License
*/
#include "core/refcounted.h"
#include "core/singleton.h"
#include "core/coreserver.h"
#include "io/ioserver.h"

//------------------------------------------------------------------------------
namespace Models
{
class Nebula3Runtime : public Core::RefCounted
{
    __DeclareClass(Nebula3Runtime);
    __DeclareSingleton(Nebula3Runtime);
public:
    /// constructor
    Nebula3Runtime();
    /// destructor
    virtual ~Nebula3Runtime();
    
    /// setup the Nebula3 runtime
    void Setup();
    /// discard the Nebula3 runtime
    void Discard();
    /// return true if valid
    bool IsValid() const;

private:
    Ptr<Core::CoreServer> coreServer;
    Ptr<IO::IoServer> ioServer;
    bool isValid;
};

//------------------------------------------------------------------------------
/**
*/
inline bool
Nebula3Runtime::IsValid() const
{
    return this->isValid;
}

} // namespace Maya
//------------------------------------------------------------------------------

